<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

%>

<!DOCTYPE html>
<html lang="en" dir="ltr">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>-</title>


    <link type="text/css" href="<%=basePath%>static/sub/assets/css/vendor-morris.css" rel="stylesheet">
    <link type="text/css" href="<%=basePath%>static/sub/assets/css/vendor-bootstrap-datepicker.css" rel="stylesheet">

    <!-- Prevent the demo from appearing in search engines -->
    <meta name="robots" content="noindex">

    <!-- App CSS -->
    <link type="text/css" href="<%=basePath%>static/sub/assets/css/app.css" rel="stylesheet">
    <link type="text/css" href="<%=basePath%>static/sub/assets/css/app.rtl.css" rel="stylesheet">

    <!-- Simplebar -->
    <link type="text/css" href="<%=basePath%>static/sub/assets/vendor/simplebar.css" rel="stylesheet">
<script src="https://cdn.bootcss.com/jquery/2.1.4/jquery.js"></script>
<link rel="stylesheet"
	href="//cdn.datatables.net/1.10.15/css/jquery.dataTables.min.css">
<script src="//cdn.datatables.net/1.10.15/js/jquery.dataTables.min.js"></script>

<link rel="stylesheet" href="<%=basePath%>static/animate.css">
<script src="<%=basePath%>static/js.js" charset="utf-8"></script>
<style>
body {
	overflow-x: hidden
}

body::-webkit-scrollbar { /*滚动条整体样式*/
	width: 5px; /*高宽分别对应横竖滚动条的尺寸*/
	height: 1px;
}

body::-webkit-scrollbar-thumb { /*滚动条里面小方块*/
	border-radius: 10px;
	-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
	background: #EEE;
}

body::-webkit-scrollbar-track { /*滚动条里面轨道*/
	-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
	border-radius: 10px;
	background: #DDD;
}

.dataTables_filter input {
	border: 1px solid #ddd;
}
</style>
<script>
	$(document).ready(function() {
		$('table').DataTable({
			language : {
				"sProcessing" : "处理中...",
				"sLengthMenu" : "显示 _MENU_ 项结果",
				"sZeroRecords" : "没有匹配结果",
				"sInfo" : "显示第 _START_ 至 _END_ 项结果，共 _TOTAL_ 项",
				"sInfoEmpty" : "显示第 0 至 0 项结果，共 0 项",
				"sInfoFiltered" : "(由 _MAX_ 项结果过滤)",
				"sInfoPostFix" : "",
				"sSearch" : "搜索:",
				"sUrl" : "",
				"sEmptyTable" : "表中数据为空",
				"sLoadingRecords" : "载入中...",
				"sInfoThousands" : ",",
				"oPaginate" : {
					"sFirst" : "首页",
					"sPrevious" : "上页",
					"sNext" : "下页",
					"sLast" : "末页"
				},
				"oAria" : {
					"sSortAscending" : ": 以升序排列此列",
					"sSortDescending" : ": 以降序排列此列"
				}
			}
		});

	});
</script>
    <style>
    
   /* .am-form-group col-md-6{padding:15px;text-align:left;width: 45%;display: inline-block;padding: 1px;}
    .am-form-group col-md-6 label{width:100px;height:45px;padding-top:10px;text-align:right;float:left;}*/
    </style>
</head>

<body data-type="index">


    





       
          
            <div class="row am-u-md-8" style="padding-left:30px;padding-right:30px;">
              
<div class="tpl-portlet-components">
                <div class="portlet-title">
                    <div class="caption font-green bold">
                        <span class="am-icon-plus"></span> 新增员工
                    </div>
                    <div class="tpl-portlet-input tpl-fz-ml">
                        <div class="portlet-input input-small input-inline">
                            <div class="input-icon right">
                              
                                </div>
                        </div>
                    </div>


                </div>
                <div class="tpl-block ">

                    <div class="am-g tpl-amazeui-form">


                        <div class="am-u-sm-12 am-u-md-12">
                            <form class="am-form form-" action="<%=basePath %>users/users/save" method="POST">

                                <div class="row">

                            <div class="form-group col-md-4">
                                    <label for="user-name"  class="am-u-sm-2 am-form-label">类型</label>
                                    <div class="am-u-sm-8">
                                         <select name="type" style="" class="form-control">
                                             
        	 <option value="1">员工</option>
        	<option value="5">管理员</option>
        </select>
                                        <small></small>
                                    </div>
                                </div>
                                
                                 <div class="am-form-group col-md-4">
                                    <label for="user-name" class="am-u-sm-2 am-form-label">工资</label>
                                    <div class="am-u-sm-8">
                                        <input type="number" class="form-control"  name="money" required placeholder="">
                                        <small></small>
                                    </div>
                                </div>
                                
                              
                            
                                <div class="form-group col-md-4">
                                    <label for="user-name" class="am-u-sm-2 am-form-label">账号</label>
                                    <div class="am-u-sm-8">
                                        <input type="text" name="username" required placeholder="">
                                        <small></small>
                                    </div>
                                </div>
                                </div>
                                <div class="row">
                                
                                  <div class="form-group col-md-4">
                                    <label for="user-name" class="am-u-sm-2 am-form-label">部门</label>
                                    <div class="am-u-sm-8">
                                     <select name="company">
                                        <c:forEach items="${requestScope.list }" var="u" varStatus="st">
                                        <option value="${u.id }">
                                        ${u.title }
                                        </option>
                                        </c:forEach>
                                        </select>
                                        <small></small>
                                    </div>
                                </div>
                                
                                 <div class="am-form-group col-md-4">
                                    <label for="user-name" class="am-u-sm-2 am-form-label">密码</label>
                                    <div class="am-u-sm-8">
                                        <input type="password" name="password" required placeholder="">
                                        <small></small>
                                    </div>
                                </div>
                                <div class="clear"></div>
                                 
                                 <div class="am-form-group col-md-4">
                                    <label for="user-name" class="am-u-sm-2 am-form-label">确认密码</label>
                                    <div class="am-u-sm-8">
                                        <input type="password" name="password2" required placeholder="">
                                        <small></small>
                                    </div>
                                </div>

                                </div>

                                <div class="row">
                                
                                <div class="am-form-group col-md-12">
                                    <label for="user-name" class="am-u-sm-2 am-form-label">头像</label>
                                    <div class="am-u-sm-8">
                                        <input readonly type="text"   required   id="thumb" value="" name="thumb" >
																<a href="javascript:;" class="uploadImg">点击上传</a>
                                        <small></small>
                                    </div>
                                </div>
                                </div>
                                <div class="row">
                                <div class="am-form-group col-md-4">
                                    <label for="user-name" class="am-u-sm-2 am-form-label">姓名</label>
                                    <div class="am-u-sm-8">
                                        <input type="text" name="realname" required placeholder="">
                                        <small></small>
                                    </div>
                                </div>



                                 
                                <div class="am-form-group col-md-4">
                                    <label for="user-name" class="am-u-sm-2 am-form-label">性别</label>
                                    <div class="am-u-sm-8">
                                        <select class="form-control" name="sex" id="">
                                            <option  value="1" >男</option>
                                            <option   value="2" >女</option>
                                        </select>
                                        <small></small>
                                    </div>
                                </div>
                                
                              
                                    <div class="am-form-group col-md-4">
                                    <label for="user-name" class="am-u-sm-2 am-form-label">年龄</label>
                                    <div class="am-u-sm-8">
                                        <input type="number" class="form-control"  name="age" required placeholder="">
                                        <small></small>
                                    </div>
                                </div>
                                </div>


                                <div class="row">
 <div class="am-form-group col-md-6">
                                    <label for="user-name" class="am-u-sm-2 am-form-label">身份证</label>
                                    <div class="am-u-sm-8">
                                        <input type="text" name="ecard" required placeholder="">
                                        <small></small>
                                    </div>
                                </div>
                                
                                 <div class="am-form-group col-md-6">
                                    <label for="user-name" class="am-u-sm-2 am-form-label">联系地址</label>
                                    <div class="am-u-sm-8">
                                        <input type="text" name="address" required placeholder="">
                                        <small></small>
                                    </div>
                                </div>
                                    </div>


                                <div class="row">
                                    <div class="am-form-group col-md-4">
                                    <label for="user-name" class="am-u-sm-2 am-form-label">邮箱</label>
                                    <div class="am-u-sm-8">
                                        <input type="text" name="email" required placeholder="">
                                        <small></small>
                                    </div>
                                </div>
                                    
                                
                                   <div class="am-form-group col-md-4">
                                    <label for="user-name" class="am-u-sm-2 am-form-label">qq</label>
                                    <div class="am-u-sm-8">
                                        <input type="text" name="qq" required placeholder="">
                                        <small></small>
                                    </div>
                                </div>
                                 
                                 <div class="am-form-group col-md-4">
                                    <label for="user-name" class="am-u-sm-2 am-form-label">电话</label>
                                    <div class="am-u-sm-8">
                                        <input type="text" name="tel" required placeholder="">
                                        <small></small>
                                    </div>
                                </div>
                                </div>

                                <div class="row" style="padding-top: 10px">
                                <div class="am-form-group col-md-6">
                                    <div class="am-u-sm-9 am-u-sm-push-3">
                                        <button type="submit" class="btn btn-primary">保存数据</button>
                                    </div>
                                </div></div>
                            </form>
                        </div>
                    </div>
                </div>

            </div>
    </div>    </div>
    


    <script src="<%=basePath %>static/assets/js/jquery.min.js"></script>
    <script src="<%=basePath %>static/assets/js/amazeui.min.js"></script>
    <script src="<%=basePath %>static/assets/js/iscroll.js"></script>
    <script src="<%=basePath %>static/assets/js/app.js"></script>
    <script src="<%=basePath %>static/layer/layer.js"></script>
    <script src="<%=basePath%>source/scripts/window.js"></script>

  <c:if test="${!empty message}">		
			<script>
			 var btn = $("#showMsgBtn", window.parent.document);
		       var msg = $("#msg", window.parent.document);
		       $(msg).val("${message}");
		       $(btn).click();
			//layer.alert("${message}",{icon: 1});
			</script>
		</c:if>
		
		<script>
window.onload = function(){
	$(".uploadImg").click(function(){
		openWindow("<%=basePath%>upload.jsp");
	});
	$("#thumb").on("input",function(){
		$(".oldImg").attr("src","<%=basePath%>"+$("#thumb").val());
	});
};
</script>



</body>

</html>
